package com.mindata.blockchain.socket.handler.server;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tio.core.ChannelContext;

import com.mindata.blockchain.socket.base.AbstractBlockHandler;
import com.mindata.blockchain.socket.body.HeartBeatBody;
import com.mindata.blockchain.socket.packet.BlockPacket;

/**
 * 客户端心跳包
 * 
 * @author wuweifeng wrote on 2018/3/12.
 */
@Deprecated
public class HeartBeatHandler extends AbstractBlockHandler<HeartBeatBody> {
	private final Logger logger = LoggerFactory.getLogger(HeartBeatHandler.class);

	@Override
	public Class<HeartBeatBody> bodyClass() {
		return HeartBeatBody.class;
	}

	@Override
	public Object handler(final BlockPacket packet, final HeartBeatBody heartBeatBody,
			final ChannelContext channelContext) throws Exception {
		logger.info("收到<心跳包>消息", heartBeatBody.getText());

		return null;
	}
}
